package com.xiaoran.boot.controller;


import com.xiaoran.boot.bean.Car;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

@RestController //这个类是：@ResponseBody（标识当前也的返回值在页面上显示）和@Controller（标识为控制类）
@Slf4j
public class HelloController {

    @RequestMapping("/helloboot")
    public String  test1(){
        return "hello ,springBoot";
    }

    @Autowired
    private  Car car;
    @RequestMapping("/car1")
    public Car test2(){
        log.error("成功导入。。。。。。。。。。。。。。");
        return car  ;
    }

}
